/**
 * 荣耀手机子类：实现MagicOS系统+鹰眼相机专属功能
 */
public class HonorPhone extends Phone {
    // 子类专属属性：MagicOS系统版本、是否支持5G
    private String magicOSVersion;
    private boolean support5G;

    // 构造方法：调用父类构造+初始化专属属性
    public HonorPhone(String model, int ram, int storage, String magicOSVersion, boolean support5G) {
        super("Honor", model, ram, storage); // 品牌固定为Honor
        this.magicOSVersion = magicOSVersion;
        this.support5G = support5G;
    }

    // 重写抽象方法：荣耀专属逻辑
    @Override
    public String takePhoto() {
        // 个性化：鹰眼相机+运动抓拍
        return super.getBrand() + super.getModel() + " 使用鹰眼相机拍照，支持运动物体抓拍，当前相机：" + currentCamera;
    }

    @Override
    public String showSystemInfo() {
        // 个性化：显示MagicOS系统信息+5G支持状态
        String networkDesc = support5G ? "支持双模5G" : "4G全网通";
        return "【MagicOS系统】品牌：" + brand + "，型号：" + model + "，内存：" + ram + "GB，系统版本：" + magicOSVersion + "，网络规格：" + networkDesc;
    }

    @Override
    public String makeCall(String phoneNumber) {
        // 个性化：荣耀畅连通话（延续华为畅连逻辑，新增5G高清特性）
        consumePower(2);
        String callDesc = support5G ? "5G高清通话" : "普通高清通话";
        return "通过荣耀畅连拨打号码：" + phoneNumber + "，通话中...（" + callDesc + "，支持多设备接续）";
    }

    @Override
    public String sendMessage(String phoneNumber, String content) {
        // 个性化：荣耀短信+智慧识屏
        consumePower(1);
        return "给 " + phoneNumber + " 发送短信：" + content + "（已启用智慧识屏，可提取关键信息）";
    }

    // 子类专属方法：荣耀隐私保护
    public String privacyProtection() {
        consumePower(1);
        return brand + model + " 已开启隐私保护模式，敏感信息自动隐藏！";
    }

    // 专属属性的getter
    public String getMagicUiVersion() {
        return magicOSVersion;
    }

    public boolean isSupport5G() {
        return support5G;
    }
}
